# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.ChromeManagement.V1.Model.GoogleChromeManagementV1NetworkStatusReport do
  @moduledoc """
  State of visible/configured networks. * This field is telemetry information and this will change over time as the device is utilized. * Data for this field is controlled via policy: [ReportNetworkStatus](https://chromeenterprise.google/policies/#ReportNetworkStatus) * Data Collection Frequency: 60 minutes * Default Data Reporting Frequency: 3 hours - Policy Controlled: Yes * Cache: If the device is offline, the collected data is stored locally, and will be reported when the device is next online: Yes * Reported for affiliated users only: Yes * Granular permission needed: TELEMETRY_API_NETWORK_REPORT

  ## Attributes

  *   `connectionState` (*type:* `String.t`, *default:* `nil`) - Output only. Current connection state of the network.
  *   `connectionType` (*type:* `String.t`, *default:* `nil`) - Output only. Network connection type.
  *   `encryptionOn` (*type:* `boolean()`, *default:* `nil`) - Output only. Whether the wifi encryption key is turned off.
  *   `gatewayIpAddress` (*type:* `String.t`, *default:* `nil`) - Output only. Gateway IP address.
  *   `guid` (*type:* `String.t`, *default:* `nil`) - Output only. Network connection guid.
  *   `lanIpAddress` (*type:* `String.t`, *default:* `nil`) - Output only. LAN IP address.
  *   `receivingBitRateMbps` (*type:* `String.t`, *default:* `nil`) - Output only. Receiving bit rate measured in Megabits per second.
  *   `reportTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. Time at which the network state was reported.
  *   `sampleFrequency` (*type:* `String.t`, *default:* `nil`) - Output only. Frequency the report is sampled.
  *   `signalStrengthDbm` (*type:* `integer()`, *default:* `nil`) - Output only. Signal strength for wireless networks measured in decibels.
  *   `transmissionBitRateMbps` (*type:* `String.t`, *default:* `nil`) - Output only. Transmission bit rate measured in Megabits per second.
  *   `transmissionPowerDbm` (*type:* `integer()`, *default:* `nil`) - Output only. Transmission power measured in decibels.
  *   `wifiLinkQuality` (*type:* `String.t`, *default:* `nil`) - Output only. Wifi link quality. Value ranges from [0, 70]. 0 indicates no signal and 70 indicates a strong signal.
  *   `wifiPowerManagementEnabled` (*type:* `boolean()`, *default:* `nil`) - Output only. Wifi power management enabled
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :connectionState => String.t() | nil,
          :connectionType => String.t() | nil,
          :encryptionOn => boolean() | nil,
          :gatewayIpAddress => String.t() | nil,
          :guid => String.t() | nil,
          :lanIpAddress => String.t() | nil,
          :receivingBitRateMbps => String.t() | nil,
          :reportTime => DateTime.t() | nil,
          :sampleFrequency => String.t() | nil,
          :signalStrengthDbm => integer() | nil,
          :transmissionBitRateMbps => String.t() | nil,
          :transmissionPowerDbm => integer() | nil,
          :wifiLinkQuality => String.t() | nil,
          :wifiPowerManagementEnabled => boolean() | nil
        }

  field(:connectionState)
  field(:connectionType)
  field(:encryptionOn)
  field(:gatewayIpAddress)
  field(:guid)
  field(:lanIpAddress)
  field(:receivingBitRateMbps)
  field(:reportTime, as: DateTime)
  field(:sampleFrequency)
  field(:signalStrengthDbm)
  field(:transmissionBitRateMbps)
  field(:transmissionPowerDbm)
  field(:wifiLinkQuality)
  field(:wifiPowerManagementEnabled)
end

defimpl Poison.Decoder,
  for: GoogleApi.ChromeManagement.V1.Model.GoogleChromeManagementV1NetworkStatusReport do
  def decode(value, options) do
    GoogleApi.ChromeManagement.V1.Model.GoogleChromeManagementV1NetworkStatusReport.decode(
      value,
      options
    )
  end
end

defimpl Poison.Encoder,
  for: GoogleApi.ChromeManagement.V1.Model.GoogleChromeManagementV1NetworkStatusReport do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
